<%@page import="java.util.*"%>
<%@page import="java.text.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 
<%
    String path = request.getContextPath(); 
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+path+ "/"; 
     
%>
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
	<title>推送消息详情</title>
	<link rel="stylesheet" href="bootstrap-3.3.7-dist/css/bootstrap.min.css" />
	<link rel="stylesheet" href="css/bootstrap-datetimepicker.css" />
    <link rel="stylesheet" href="bootstrap-table/dist/bootstrap-table.css">
    <link rel="stylesheet" type="text/css" href="css/xcConfirm.css" />
	<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300" />
	<link rel="stylesheet" href="http://cache.amap.com/lbs/static/main1119.css"/>
	<link rel="stylesheet" href="bootstrap-fileinput-master/css/fileinput.min.css">
    
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="css/font.css">
    <link rel="stylesheet" href="css/xadmin.css">
    <link href="umeditor/themes/default/css/umeditor.css" type="text/css"
      	rel="stylesheet">
    
    <style type="text/css">
        #panel {
            position: absolute;
            background-color: white;
            max-height: 90%;
            overflow-y: auto;
            top: 10px;
            right: 10px;
            width: 280px;
        }
        .td1{
			float:left;
			width:50px;
			display: block; 
			valign:middle;
		}
		.td2{
			float:left;
			width:200px;
			display: block; 
			valign:middle;
		}
		.td3{
			float:left;
			width:660px;
			display: block; 
			valign:middle;
		}
		.edui-editor-body .edui-body-container {
			min-height: 200px!important;
		}
    </style>
</head>
<body>
	<div class="x-body">
            <div   class="form-horizontal" role="form">
              <input type="hidden" id="gId" value="${message.gId}">
			  <div class="form-group">
			  <label for="firstname" class="col-sm-2 control-label" style="font-size: 13px">*推送标题:</label>
			    <div class="col-sm-3">
			      <input type="text" class="form-control" id="title" name="title" required="required" readonly="readonly" placeholder="请输入推送标题" value="${message.gTitle}"/>
			    </div>
			  </div>
			  
			  <div class="form-group">
			    <label for="firstname" class="col-sm-2 control-label" style="font-size: 13px">*推送用户:</label>
			    <div class="col-sm-8">
			        <input id="range" readonly="readonly"  type="radio" name="range" value="1" <c:if test="${message.gRang==1}">checked="checked"</c:if>><span style="font-size: 13px">全部用户</span>
			        <input id="range" readonly="readonly"  type="radio" name="range" value="2" <c:if test="${message.gRang==2}">checked="checked"</c:if>><span style="font-size: 13px">VIP用户</span>
			        <input id="range" readonly="readonly"  type="radio" name="range" value="3" <c:if test="${message.gRang==3}">checked="checked"</c:if>><span style="font-size: 13px">非VIP用户</span>
			        <input id="range" readonly="readonly"  type="radio" name="range" value="4" <c:if test="${message.gRang==4}">checked="checked"</c:if>><span style="font-size: 13px">年度会员</span>
			        <input id="range" readonly="readonly"  type="radio" name="range" value="5" <c:if test="${message.gRang==5}">checked="checked"</c:if>><span style="font-size: 13px">季度会员</span>
			        <input id="range" readonly="readonly"  type="radio" name="range" value="6" <c:if test="${message.gRang==6}">checked="checked"</c:if>><span style="font-size: 13px">月度会员</span>   	
			    </div>
			  </div>
			  
			  <div class="form-group">
			    <label for="firstname" class="col-sm-2 control-label" style="font-size: 13px">推送时间:</label>
			    <div class="col-sm-3">
			      <input type="text" class="form-control" id="startDate" readonly="readonly"  name="startDate"  placeholder="请输入推送时间" value='<fmt:formatDate value="${message.gPushTime}"/>'/>
			    </div>
			  </div>
			  
			 <div class="form-group">
			    <label for="firstname" class="col-sm-2 control-label" style="font-size: 13px">推送内容:</label>
			    <div class="col-sm-8">
			        <script type="text/plain" id="myEditor" class="form-control">${message.gContent}</script>
	                <input type="hidden" id="replyContent" name="replyContent">
			    </div>
		    </div>
            
     	<div class="form-group" style="padding-left: 30%">
    
        <button type="reset"    onclick="cancel()"  class="btn btn-info" >取消 </button>
   
     </div>
          </div>
	</div>
        <script src="lib/layui/layui.js" charset="utf-8">
        </script>
        <script src="js/x-layui.js" charset="utf-8">
        </script>
        <!-- 加载需要的js -->
		<script src="js/jquery-3.2.1.min.js"></script>
		<script src="bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
		<script src="js/jquery-bootstrap-pagination.js"></script>
		<script src="js/qunit-1.11.0.js"></script>
		<script src="js/bootstrap-datetimepicker.js"></script>
		<script src="js/bootstrap-datetimepicker.zh-CN.js"></script>
	    <script src="js/xcConfirm.js" type="text/javascript" charset="utf-8"></script>
	    <script src="bootstrap-fileinput-master/js/fileinput.min.js"></script>
		<script src="bootstrap-fileinput-master/js/locales/zh.js"></script>
		<script src="js/jquery-3.2.1.min.js"></script>
        <!--ueditor插件js-->
		<script type="text/javascript"
			src="umeditor/third-party/template.min.js"></script>
		<script type="text/javascript" charset="utf-8"
			src="umeditor/umeditor.config.js"></script>
		<script type="text/javascript" charset="utf-8"
			src="umeditor/umeditor.js"></script>
        <script src="lib/layui/layui.js" charset="utf-8">
        </script>
        <script src="js/x-layui.js" charset="utf-8">
      
        </script>
        <script>
            layui.use(['form','layer','upload'], function(){
                $ = layui.jquery;
              var form = layui.form()
              ,layer = layui.layer;
              });
           
            //实例化编辑器
    		var um = UM.getEditor('myEditor');
    		//失去焦点
    		um.addListener('blur', function() {
    			//判断是否有内容
    			if (UM.getEditor('myEditor').hasContents()) {
    				$("#replyContent").val(
    						UM.getEditor('myEditor').getContent());
    			}
    		});
    
   	   
   	   function cancel(){
   		   	
   		// 获得frame索引
           var index = parent.layer.getFrameIndex(window.name);
           //关闭当前frame
           parent.layer.close(index);
   	         
   			}
   	   
   	layui.use(['laydate','element','laypage','layer','form'], function(){
    	var form = layui.form(); //只有执行了这一步，部分表单元素才会修饰成功 
    	$ = layui.jquery;//jquery
      laydate = layui.laydate;//日期插件
      lement = layui.element();//面包导航
      laypage = layui.laypage;//分页
      layer = layui.layer;//弹出层
      form.render();
      //以上模块根据需要引入
      var start = {
        min:  laydate.now()
        ,max: '2099-06-16 23:59:59'
        ,istoday: false
        ,choose: function(datas){
          end.min = datas; //开始日选好后，重置结束日的最小日期
          end.start = datas //将结束日的初始值设定为开始日
        }
      };
      
      var end = {
        min: laydate.now()
        ,max: '2099-06-16 23:59:59'
        ,istoday: false
        ,choose: function(datas){
          start.max = datas; //结束日选好后，重置开始日的最大日期
        }
      };
     
      document.getElementById('startDate').onclick = function(){
        start.elem = this;
        laydate(start);
      }      
    });
        </script>
</body>
</html>